import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

export default new Router({
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect: '/index',
    }, {
      path: '/index',
      name: 'Index',
      meta: {title: "首页"},
      component: () => import( '../views/Index/index.vue')
    }, {
      path: '/model',
      name: 'Model',
      meta: {title: "实体类生成"},
      component: () => import( '../views/Model/model.vue')
    }, {
      path: '/model-js',
      name: 'ModelJs',
      meta: {title: "模型转JS"},
      component: () => import( '../views/ModelJs/model-js.vue')
    }, {
      path: '/js-html',
      name: 'JsHtml',
      meta: {title: "HTML生成"},
      component: () => import( '../views/JsHtml/js-html.vue')
    }, {
      path: '/json-path',
      name: 'JsonPath',
      meta: {title: "JSONPath"},
      component: () => import( '../views/JsonPath/json-path.vue')
    }, {
      path: '/convert-font',
      name: 'ConvertFont',
      meta: {title: "字体转换"},
      component: () => import( '../views/ConvertFont/convert-font.vue')
    }, {
      path: '/time',
      name: 'Time',
      meta: {title: "时间相关"},
      component: () => import( '../views/Time/time.vue')
    }, {
      path: '/regular',
      name: 'Regular',
      meta: {title: "正则表达式"},
      component: () => import( '../views/Regular/regular.vue')
    }, {
      path: '/text-compare',
      name: 'TextCompare',
      meta: {title: "文本比对"},
      component: () => import( '../views/TextCompare/text-compare.vue')
    }, {
      path: '/test',
      name: 'Test',
      meta: {title: "测试"},
      component: () => import( '../views/Test/test.vue')
    }, {
      path: '*',
      redirect: '/'
    }
  ]
})
